package clock;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

import javax.swing.*;
import java.util.Date;

public class ClockJob implements Job {

    private static JFrame frame = Dialog.createDialog();

    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
        System.out.println("clock job execute");
        System.out.println(new Date().toLocaleString());

//        JOptionPane.showMessageDialog(null, "休息时间到(1小时)", "Java内核程序实现的alert对话框", JOptionPane.INFORMATION_MESSAGE);
        frame.setVisible(true);

    }
}
